package libs

import (
	goredislib "github.com/redis/go-redis/v9"
)

var client *goredislib.Client

func redisInit() error {
	// Create a pool with go-redis (or redigo) which is the pool redisync will
	// use while communicating with Redis. This can also be any pool that
	// implements the `redis.Pool` interface.
	// 创建redis 客户端
	client = goredislib.NewClient(&goredislib.Options{
		Addr:     "110.40.159.189:6379",
		Password: "Gjf5845201314gjf",
	})
	return nil
}

func GetRedis() *goredislib.Client {
	return client
}
